<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>

		
		</style>

		<script>
		
			function getInfo(){
				console.log("Math.PI",Math.PI);
				console.log("Math.E",Math.E);
				
				//数学相关的函数
				console.log("去绝对值的Math.abs(-10)",Math.abs(-10))
				
				// 棚顶函数 ， 向上取整
				console.log("Math.ceil(3.14)" ,Math.ceil(3.14))
				console.log("Math.ceil(3.54)" ,Math.ceil(3.54))
				console.log("Math.ceil(3.64)" ,Math.ceil(3.64))
				console.log("Math.ceil(3.74)" ,Math.ceil(3.74))
				console.log("Math.ceil(3.84)" ,Math.ceil(3.84))
				console.log("Math.ceil(4.14)" ,Math.ceil(4.14))
				console.log("Math.ceil(4.84)" ,Math.ceil(4.84))
				console.log("Math.ceil(-3.14)" ,Math.ceil(-3.14))
				console.log("Math.ceil(-3.54)" ,Math.ceil(-3.54))
				console.log("Math.ceil(-3.64)" ,Math.ceil(-3.64))
				console.log("Math.ceil(-3.74)" ,Math.ceil(-3.74))
				console.log("Math.ceil(-3.84)" ,Math.ceil(-3.84))
				console.log("Math.ceil(-4.14)" ,Math.ceil(-4.14))
				console.log("Math.ceil(-4.84)" ,Math.ceil(-4.84))
				
				// 地板函数 ， 向下取整
				console.log("Math.floor(3.14)" ,Math.floor(3.14))
				console.log("Math.floor(3.54)" ,Math.floor(3.54))
				console.log("Math.floor(3.64)" ,Math.floor(3.64))
				console.log("Math.floor(3.74)" ,Math.floor(3.74))
				console.log("Math.floor(3.84)" ,Math.floor(3.84))
				console.log("Math.floor(4.14)" ,Math.floor(4.14))
				console.log("Math.floor(4.84)" ,Math.floor(4.84))
				console.log("Math.floor(-3.14)" ,Math.floor(-3.14))
				console.log("Math.floor(-3.54)" ,Math.floor(-3.54))
				console.log("Math.floor(-3.64)" ,Math.floor(-3.64))
				console.log("Math.floor(-3.74)" ,Math.floor(-3.74))
				console.log("Math.floor(-3.84)" ,Math.floor(-3.84))
				console.log("Math.floor(-4.14)" ,Math.floor(-4.14))
				console.log("Math.floor(-4.84)" ,Math.floor(-4.84))
				
				
				
				// 截断  保留整数位
				console.log("Math.trunc(3.64)" ,Math.trunc(3.64))
				console.log("Math.trunc(4.14)" ,Math.trunc(4.14))
				console.log("Math.trunc(4.84)" ,Math.trunc(4.84))
				console.log("Math.trunc(-3.14)" ,Math.trunc(-3.14))
				
				
				//四舍五入 保留整数位
				console.log("Math.round(3.64)" ,Math.round(3.64))
				console.log("Math.round(4.14)" ,Math.round(4.14))
				console.log("Math.round(4.84)" ,Math.round(4.84))
				console.log("Math.round(-3.14)",Math.round(-3.14))
				console.log("Math.round(-3.84)",Math.round(-3.84))
				
				//三角函数
				console.log("Math.sin(0.1)",Math.sin(0.1));
				
				console.log("Math.sqrt(4)",Math.sqrt(4));
				
				
				//随机数  0-1之间的数字 小数
				for (var i = 0; i < 100; i++) {
					console.log("Math.random()*10",Math.trunc(Math.random()*10))
				}
				
				
				
				
			}
		</script>
	</head>
	<body >
		<button type="button" class="mui-btn mui-btn-blue" onclick="getInfo()">执行Math相关的函数</button>
	</body>
	
	
	
</html>
